package com.example.test_flowable.controller;

import org.flowable.engine.ProcessEngine;
import org.flowable.engine.RepositoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SimpleController {

    @Autowired
    private ProcessEngine processEngine;

    @Autowired
    private RepositoryService repositoryService;

    @GetMapping("/simpleTest")
    public void simpleTest() {
        processEngine.getRuntimeService().startProcessInstanceByKey("test001");
        //repositoryService.activateProcessDefinitionByKey("test001");
    }

}
